<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <!-- 节点 -->
        <div id="app">
            yahoo
            <h2>tom</h2>
        </div>
        <script>
            // let div = document.querySelector('#app')
            // console.dir(div.childNodes)
            // let str = '2300071698@qq.com'
            // console.log(str.indexOf())
            //\w 字母数字下划线
            // let res = /\w/.test(str)
            // console.log(res)

            // let res = str.match(/\w{30}/)
            // console.log(res)

            // let mobile = '1869999991266'
            // console.log(mobile.match(/^18[56]\d{8}$/))

            let email = '2300071698@qq.com'
            // let reg = /\w{0,1000}/
            // let reg = /\w*/
            // let reg = /z+/.test(email)
            // console.log(reg)

            let reg = /\w+@\w+\.(com\.cn|cn|org|com)/
            console.log(email.match(reg))

            // let str = 'abc'
            // console.log(str.match(/.+/))
        </script>
    </body>
</html>
